1. Field of the Invention
The present invention relates to an image processing apparatus of digital image data and an image processing method thereof.
2. Description of the Related Art
Recently, due to improved performance of digital cameras, resolution of photographed images has become extremely high and it has become possible to obtain high-quality photograph images which are in no way inferior to photographs taken by silver-salt film cameras. Photographed images can be viewed or edited by using an image processing application program installed in a personal computer or the like.
In general, geometric distortion is generated in an image photographed by a camera because of lens distortion aberration. In order to correct the aberration, an image processing application program is available to correct aberration by utilizing the information at the time of taking the photograph, for example, the photograph lens. By executing such distortion aberration correction processing, more homogeneous and higher-quality images can be obtained.
FIG. 2A shows distortion aberration correction processing performed in a case of correcting an image having barrel distortion. FIG. 2B shows distortion aberration correction processing in a case of correcting an image having pincushion distortion.
Since distortion aberration correction processing involves migration of pixel positions, the boundary shape of an image also changes. Meanwhile, a boundary shape of an image is generally rectangular. Therefore, it is a general procedure that, after the distortion aberration correction processing is performed, the image is trimmed to a maximum-size rectangle or trimmed at an aspect ratio of the camera which has taken the photograph, and the image in the circumferential region is cut out to create a rectangle-shaped image (e.g., refer to Japanese Patent Laid-Open No. 2007-129587).
However, when a photograph including a person's face in the circumferential region is subjected to distortion aberration correction and then trimmed, the geometric distortion of the lens is properly corrected, but part of the object's face is sometimes missing or the entire face of the object is sometimes cut out. For instance, in a case where there is an object's face at the edge portion of the screen, the trimming may cause a partial missing of the face (see FIGS. 3A and 3B).